
public class Consumer implements Runnable {
    private Buffer buffer;
    //----------------------------------------------------------
    public Consumer(Buffer buffer) {
        this.buffer = buffer;
    }
    //----------------------------------------------------------
    @Override
    public void run() {
        while (true){
            System.out.println("Get consumer " + buffer.get());
        }
    }
    //---------------------------------------------------------
}//End class Consumer
